package com.mike.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.RequestAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.mike.pojo.EmpIntro;
import com.mike.service.Iservice.empintroService;
import com.opensymphony.xwork2.ModelDriven;




@Component("eiAction")
public class eiAction implements ModelDriven,RequestAware{
	@Autowired
	private empintroService eii;
	
	private Map<String, Object> requestMap = null;
	@Override
	public void setRequest(Map<String, Object> requestMap) {
		this.requestMap = requestMap;
		
	}

	
	private EmpIntro ei = new EmpIntro();
	@Override
	public Object getModel() {
		// TODO Auto-generated method stub
		return ei;
	}
	
	public String findById(){
		System.out.println("findById方法进来了");
		 List<EmpIntro> list = eii.queryei(ei.getEmpno());
		 System.out.println(list);
		requestMap.put("ei", list);
		return "success";
	}

}
